<p><%= link_to "enviar invitación", new_invitation_path %></p>
<% unless @invitations.blank? %>
  <table>
    <tr>
      <th>envía</th>
      <th>email</th>
      <th>enviado</th>
      <th>recibido</th>
      <th>usuario</th>
    </tr>
    <% @invitations.each do |i| %>
      <tr>
        <td><%= i.sender.name %></td>
        <td><%= i.email %></td>
        <td><%= distance_of_time_in_words Time.now, i.created_at %></td>
        <td><%= distance_of_time_in_words Time.now, i.updated_at %></td>
        <td><%= i.receiver.name unless i.receiver.nil? %></td>
      </tr>
    <% end %>
  </table>
  
  <%= will_paginate @invitations %>
<% end %>
